import { ReactNode } from 'react';
import styles from './index.less';
interface Iprops{
    name:string,
    count:number,
    icon?:ReactNode,
    active:boolean,
    onClick:()=>void
}
export default function MenuItem(props:Iprops) {
    const {name,count,icon,active,onClick} = props
  return (
    <button className={`${styles.menu_item} ${active?styles.active:''}` } onClick={onClick}>
      <span className={styles.menu_item_name}>{name}</span>
      <span className={styles.menu_item_count}>{count}</span>
    </button>
  );
}